<script>
	import {
		getUserInfo,
		setUserInfo
	} from 'utils/userInfo.js'
	
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
			let _this = this;
			let userInfo = getUserInfo();
			let pages = getCurrentPages();
			let curPage = pages[pages.length - 1];
			if(curPage != null && curPage.route != 'pages/index/index' && userInfo == null){
				uni.navigateTo({
					url:"/pages/index/index"
				});
			}
			
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "framework/uview-ui/index.scss";
	/*每个页面公共css */
</style>
